<template>
  <tableItem v-if="tableData" :data="tableData" :page="page" :page-size="pageSize" @change="changeHandelr" base-url="//baidu.com" />
</template>

<script>
import { getArchiveExamineLogAPI } from '@/api/archive';
import tableItem from './components/table.vue';

export default {
    components: {
        tableItem,
    },
    data() {
        return {
            page: 1,
            pageSize: 20,
            tableData: null,
        };
    },
    computed: {
        archiveType() {
            return this.$route.meta.archiveType;
        },
    },
    mounted() {
        this.getAudioExamineLog();
    },
    methods: {
        async getAudioExamineLog() {
            const { page, pageSize: size, archiveType: type } = this;
            const { data } = await getArchiveExamineLogAPI({ type, page, size });
            this.tableData = data;
        },
        async changeHandelr(page) {
            this.page = page;
            await this.getAudioExamineLog();
        },
    },
};
</script>
